<?php

$config = [
    'components' => [
        'request' => [
            // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
            'cookieValidationKey' => 'Hb7OGD_6yOqoPa8bJRhIJ57n3w43lxXs',
        ],
        'redis' => require __DIR__ . '/redis.php',
    ],
];

if (!YII_ENV_TEST) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
    ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'allowedIPs' => ['*'] // 按需调整这里
    ];
    //修复gii不能使用问题
    $vendorDir = dirname(dirname(dirname(__FILE__)))."/framework/vendor";
    $path = $vendorDir . '/yiisoft/yii2-gii/src';
    Yii::setAlias("@yii/gii", $path);
    $path = $vendorDir . '/bower-asset/jquery/dist';
    Yii::setAlias("@bower/jquery/dist", $path);
}

return $config;
